package demo14_ForkJoin;

/**
 * @author kunkun
 * @className Test01_SimpleCalc
 * @Description 直接计算
 * @date 2025/3/6 22:19
 */
public class Test01_SimpleCalc {
    public static void main(String[] args) {

        Long start = System.currentTimeMillis(),sum=0L;
        for (long i = 0; i <= 10_0000_0000; i++) {
            sum+=i;
        }
        Long end = System.currentTimeMillis();
        System.out.println("sum="+sum);//500000000500000000
        System.out.println("expend time:"+(end-start)+"ms");    //3173ms
    }
}
